Testing Properties of Generic Functions
نویسندگان
چکیده
Software testing is an important part of the software development process. Testing comes in many flavours: unit testing, property testing, regression testing, contract checking, etc. QuickCheck is probably one of the most advanced tools for testing properties of functional programs. It supports the definition of properties and random test-data generators in Haskell, and checks that a property passes the test cases. A datatype-generic function is parametrised by a type. Examples of generic functions are equality tests, maps and pretty printers. A generic function can be seen as a template algorithm that can be instantiated with (the structure of) a data type. Generic functions satisfy generic properties. This paper discusses testing properties of generic functions. It shows how generic properties can be formulated, and how QuickCheck can be used to test generic properties. Furthermore, it shows how to automatically generate QuickCheck generators using Generic Haskell.
منابع مشابه
Theta functions on covers of symplectic groups
We study the automorphic theta representation $Theta_{2n}^{(r)}$ on the $r$-fold cover of the symplectic group $Sp_{2n}$. This representation is obtained from the residues of Eisenstein series on this group. If $r$ is odd, $nle r
متن کاملInvestigation of Mechanical Properties of Self Compacting Polymeric Concrete with Backpropagation Network
Acrylic polymer that is highly stable against chemicals and is a good choice when concrete is subject to chemical attack. In this study, self-compacting concrete (SCC) made using acrylic polymer, nanosilica and microsilica has been investigated. The results of experimental testing showed that the addition of microsilica and acrylic polymer decreased the tensile, compressive and bending strength...
متن کاملOn properties of dependent general progressively type-II censored order statistics
In the literature of life-testing, general progressive censoring has been studied extensively. But, all the results have been developed under the key assumption that the units undertest are independently distributed. In this paper, we study general progressively Type-II censored order statistics arising from identical units under test which are jointly distributed according to an Archimedean co...
متن کاملComposition of Model-based Test Coverage Criteria
In this paper, we discuss adjustable coverage criteria and their combinations in model-based testing. We formalize coverage criteria and specify test goals using OCL. Then, we propose a set of functions which describe the test generation process in a generic way. Each coverage criterion is mapped to a set of test goals. Based on this set of functions, we propose a generic framework enabling fle...
متن کاملSome Basic Data Structures and Algorithms for Chemical Generic Programming
Here, we report a template library used for molecular operation, the Molecular Handling Template Library (MHTL). The library includes some generic data structures and generic algorithms, and the two parts are associated with each other by two concepts: Properties and Molecule. The concept Properties describes the interface to access objects' properties, and the concept Molecule describes the mi...
متن کامل